<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link type="text/css" href="css_dz_shop/base.css" rel="stylesheet">
<link type="text/css" href="css_dz_shop/home.css" rel="stylesheet">
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>咚咚商城</title>
    
        <!-- Bootstrap framework -->
            <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
            <link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" />
        <!-- gebo blue theme-->
            <link rel="stylesheet" href="css/blue.css" id="link_theme" />
        <!-- breadcrumbs-->
            <link rel="stylesheet" href="lib/jBreadcrumbs/css/BreadCrumb.css" />
        <!-- tooltips-->
            <link rel="stylesheet" href="lib/qtip2/jquery.qtip.min.css" />
        <!-- notifications -->
            <link rel="stylesheet" href="lib/sticky/sticky.css" />
        <!-- notifications -->
            <link rel="stylesheet" href="lib/sticky/sticky.css" />    
        <!-- splashy icons -->
            <link rel="stylesheet" href="img/splashy/splashy.css" />
		<!-- colorbox -->
            <link rel="stylesheet" href="lib/colorbox/colorbox.css" />	

        <!-- main styles -->
            <link rel="stylesheet" href="css/style.css" />
			
            <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans" />
	
        <!-- Favicon -->
            <link rel="shortcut icon" href="favicon.ico" />
		
        <!--[if lte IE 8]>
            <link rel="stylesheet" href="css/ie.css" />
            <script src="js/ie/html5.js"></script>
			<script src="js/ie/respond.min.js"></script>
        <![endif]-->
		
		<script>
			//* hide all elements & show preloader
			document.documentElement.className += 'js';
		</script>
    </head>
    <body>
		<%@ include file="inc/header.jsp"%>
		<%@ include file="inc/search.jsp"%>
		<div id="loading_layer" style="display:none"><img src="img/ajax_loader.gif" alt="" /></div>
		
		<div id="maincontainer" class="clearfix">
			<!-- header -->
             <form action="list" id="indexform">
             <input type="hidden" name="id" value="${id}" }>
            <!-- main content -->
            <div id="contentwrapper">
                <div class="main_content">
                    
                    
                    <div class="row-fluid search_page">
                        <div class="span12">
                            <h3 class="heading"><small>查询</small> ${typename }<small>的结果：</small></h3>
                            <div class="well clearfix">
                                <div class="row-fluid">
                                    <div class="pull-left">显示第${start } -  ${end }  共有 ${total }结果</div>
                                    <div class="pull-right">
                                        <span class="sepV_c">
                                     	       排序方式:
                                            <select id="orderstring" name="sortname" onchange="indexup(this.value)">
                                                <option value="GOODSNAME">商品名称</option>
                                                <option value="GOODSTIME">生产日期</option>
                                                <option value="GOODSPRICE">商品价格</option>
                                            </select>
                                        </span>
                                        <span class="sepV_c">
                                         	   每页显示数目:
                                            <select id="countname" name="countname" onchange="indexup(this.value)">
                                                <option>3</option>
                                                <option>5</option>
                                                <option>10</option>
                                            </select>
                                        </span>
                                        <span class="result_view">
											<a href="javascript:void(0)" class="box_trgr sepV_b"><i class="icon-th-large"></i></a>
											<a href="javascript:void(0)" class="list_trgr"><i class="icon-align-justify"></i></a>
										</span>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="search_panel clearfix box_view" id="dates">
                            
                            
                          		<c:forEach var="du" items="${goodslist}">
												
								  <div class="search_item clearfix">
                                    <span class="searchNb">1.</span>
                                    <div class="thumbnail pull-left">
                                        <img alt="" src=${du.goodspic } width="111" height="111">
                                    </div>
                                    <div class="search_content">
                                        <h4>
                                            <a href="item.htm?id=${du.goodsid}" class="sepV_a">${du.goodsname }</a>
                                             <span class="label label-important">${du.goodsstate }</span>
                                        </h4>
                                        <p class="sepH_b item_description">${du.goodsdesc }</p>
                                        <p class="sepH_a"><strong>单价:</strong> ${du.goodsprice }</p>
                                        <p class="sepH_a"><strong>生产日期:</strong> ${du.goodstime }</p>
                                        <p class="sepH_a"><strong>状态:</strong> ${du.goodsstate }</p>
                                    </div>
                                	</div>
								</c:forEach>
                            				
                                
                               <!--  <div class="search_item clearfix">
                                    <span class="searchNb">3.</span>
                                    <div class="thumbnail pull-left">
                                        <img alt="" src="goodsimgs/bt004.jpg" width="111" height="111">
                                    </div>
                                    <div class="search_content">
                                        <h4>
                                            <a href="javascript:void(0)" class="sepV_a">Lorem ipsum dolor sit amet</a>
                                            <span class="label label-important">Lorem ipsum</span>
                                        </h4>
                                        <p class="sepH_b item_description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In euismod commodo adipiscing. Nunc lobortis mauris sit amet lectus vulputate vitae porta nulla vehicula. Curabitur in fermentum dui. Integer lobortis odio in quam faucibus ornare. Vivamus sed nulla suscipit tortor volutpat aliquam. Ut a lorem in felis faucibus tincidunt. Duis consectetur pulvinar lacus non pulvinar. Phasellus tempor nisi at sem commodo id vehicula nisl aliquam.</p>
                                        <p class="sepH_a"><strong>Lorem ipsum:</strong> dolor sit amet</p>
                                        <small>Tag 1</small>, <small>Tag 2</small>
                                    </div>
                                </div>
                            </div> -->
                           </div>
                            <div class="pagination">
                                <!-- <ul onclick='defpage(this)'> -->
                                <select id="pageindex"  name ="index" onchange="indexup(this.value)">
                                
                                <option value ="1">第一页</option>
                                <option value ="2">第2页</option>
                                <option value ="3">第3页</option>
                                <option value ="4">第4页</option>
                                <option value ="5">第5页</option>
                                <option value ="6">第6页</option>
                                </select>
                               <!--  <ul >
                                    <li><a href="#" pageindex="Prev">Prev</a></li>
                                    <li >
                                        <a href="#" pageindex="1">1</a>
                                    </li>
                                    <li><a href="#" class="active" pageindex="2">2</a></li>
                                    <li><a href="#" pageindex="3">3</a></li>
                                    <li class="disabled"><a href="#">...</a></li>
                                    <li><a href="#" pageindex="10">10</a></li>
                                    <li><a href="#" pageindex="Next">Next</a></li>
                                </ul> -->
                            </div>  
                             
                        </div>
                    </div>
                        
                </div>
            </div>
              </form> 
			<!-- sidebar -->
		<!-- 	<a href="javascript:void(0)" class="sidebar_switch on_switch ttip_r" title="Hide Sidebar">Sidebar switch</a>
			<div class="sidebar">
				<div class="antiScroll">
					<div class="antiscroll-inner">
						<div class="antiscroll-content">
						</div>
					</div>
				</div>
			</div> -->
            
            <script src="js/jquery.min.js"></script>
			<!-- smart resize event -->
			<script src="js/jquery.debouncedresize.min.js"></script>
			<!-- hidden elements width/height -->
			<script src="js/jquery.actual.min.js"></script>
			<!-- js cookie plugin -->
			<script src="js/jquery_cookie.min.js"></script>
			<!-- main bootstrap js -->
			<script src="bootstrap/js/bootstrap.min.js"></script>
			 <!-- bootstrap plugins -->
			<script src="js/bootstrap.plugins.min.js"></script>
			<!-- tooltips -->
			<script src="lib/qtip2/jquery.qtip.min.js"></script>
			<!-- jBreadcrumbs -->
			<script src="lib/jBreadcrumbs/js/jquery.jBreadCrumb.1.1.min.js"></script>
			<!-- sticky messages -->
            <script src="lib/sticky/sticky.min.js"></script>
			<!-- fix for ios orientation change -->
			<script src="js/ios-orientationchange-fix.js"></script>
			<!-- scrollbar -->
			<script src="lib/antiscroll/antiscroll.js"></script>
			<script src="lib/antiscroll/jquery-mousewheel.js"></script>
			<!-- lightbox -->
            <script src="lib/colorbox/jquery.colorbox.min.js"></script>
			<!-- mobile nav -->
			<script src="js/selectNav.js"></script>
            <!-- common functions -->
			<script src="js/gebo_common.js"></script>
            
            <!-- search page functions -->
            <script src="js/gebo_search.js"></script>
    
			<script>
		/* 	function defpage(p){
				var x = $(p).children().html();
				alert(x+"heihei");
			} */
		    function indexup(p){
				$('#indexform').submit();
		    /* 	$.ajax({
						type: "POST",
						url: "list",
						data: "index=" + p,
						success: function(msg) { */
						/* 	location.reload() ;  */
							/* window.parent.location.reload();  */
							/* $.get(); */
							
			/* 			}
				}); */
		    };
				$(document).ready(function() {
					$('#pageindex').attr('value',"${index }");
					$('#countname').attr('value',"${countname }");
					$('#countname').attr('value',"${orderstring }");
				/* 	$('.pagination ul li a[.active]').on('click' ,function (e){
						alert('当前被选中的页码是==>' + $(this).html());
					}); */
					 
				/* 	var currentpage = $(".pagination ul li a[class='active']").attr('pageindex');
					var nextpage = currentpage;
					$(".pagination ul li a").on('click' ,function (e){
						if ($(this).attr('pageindex') == 'Next') {
							nextpage ++;
						} else if($(this).attr('pageindex') == 'Prev'){
							if (nextpage > 1) {
								nextpage --;
							}else{
								nextpage = 1;
								$(".pagination ul li a[pageindex='Prev']").addClass('disabled'); 
							}
						} else{
							nextpage = $(this).attr('pageindex');
						}
						$(".pagination ul li a[class='active']").removeClass('active');
						 $(".pagination ul li a[pageindex='"+nextpage+"']").addClass('active'); */
					/* 	 flush(nextpage);
						 
					});  */
					
					//* show all elements & remove preloader
					setTimeout('$("html").removeClass("js")',1000);
				});
			</script>
		
		</div>
	</body>
</html>